<%--
  Created by IntelliJ IDEA.
  User: lujw
  Date: 2017/6/14
  Time: 19:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/hospital_token.jsp"%>
<%
    //评论通知
    HospitalNoticeComment comment = HospitalNoticeComment.fromMap(parameters, HospitalNoticeComment.class);
    comment.setUserId(token.getUid());
    //设置评论时间
    comment.setTime(DateUtil.formatDateByFormat(new Date(), DateUtil.DATETIME_FORMAT));
    Integer commentId = (Integer)DBTools.db("basedb").addItem(comment);
    if (Objects.isNull(commentId)) {
        ErrcodeUtil.setErrcode(msg, ErrcodeUtil.FAILURE);
        Tools.encryptPrint(out, msg);
        return;
    }
    Map dataMap = new HashMap();
    dataMap.put("id", commentId);
    msg.put("data", dataMap);
    Tools.encryptPrint(out, msg);
%>
